![]() |
SetMenuItemModifiers |
||||
Header: | Menus.h | Carbon status: | Supported | |
Sets the modifier key(s) that must be pressed with a character key to select a particular menu item.
OSErr SetMenuItemModifiers ( MenuHandle inMenu, SInt16 inItem, UInt8 inModifiers );
A handle to the menu that contains the menu item for which you wish to set the modifier key(s).
An integer representing the item number of the menu item.
A value representing the modifier key(s) to be used in selecting the menu item; see
A result code.
You can call the SetMenuItemModifiers function to change the modifier key(s) you can include with a character key to create your keyboard equivalent. For example, you can change Command-x to Command-Option-Shift-x. By default, the Command key is always specified; however, you can remove the Command key by setting the kMenuNoCommand flag in the modifier keys field of an extended menu item entry in the 'xmnu' resource; see ‘xmnu’.
See also the function GetMenuItemModifiers.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon. Available in CarbonLib 1.0 and later when CarbonLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by CarbonLib 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)